Make it possible to run valgrind on code linked with the libxc libraries.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 22 Nov 2005 15:31:16 +0000 (16:31 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 22 Nov 2005 15:31:16 +0000 (16:31 +0100)
commita22292f2bb59bda113d820fa7da5629408fac98d
treec5e423a69d01967f816f3d6dc761bff77e53bcce
parent10edfe8abf0512c380bc2bb4d79af9460558f815
Make it possible to run valgrind on code linked with the libxc libraries.
Valgrind cannot see when a hypercall has initialised entries in a data
structure, so appropriate memsets have been placed before using dom0_op_t,
privcmd_hypercall_t, and a couple of miscellaneous blocks passed into this
layer.  This initialises the block so that valgrind considers it to be valid,
but the data therein will be immediately overwritten by the hypercall, all
being well.

These changes are semantically neutral if -DVALGRIND is not set.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
14 files changed:
tools/libxc/Makefile
tools/libxc/xc_bvtsched.c
tools/libxc/xc_domain.c
tools/libxc/xc_evtchn.c
tools/libxc/xc_gnttab.c
tools/libxc/xc_linux_build.c
tools/libxc/xc_linux_restore.c
tools/libxc/xc_misc.c
tools/libxc/xc_private.c
tools/libxc/xc_private.h
tools/libxc/xc_ptrace.c
tools/libxc/xc_sedf.c
tools/libxc/xc_tbuf.c
tools/libxc/xg_private.h